package com.example.gobang.model;

import lombok.Data;

@Data
public class UserInfoVO {
    private int userId;
    private String userName;
    private int score;
    private int totalCount;
    private int winCount;

    public static UserInfoVO getUserInfoVO(UserInfo userInfo) {
        if(userInfo == null) {
            return null;
        }
        UserInfoVO userInfoVO = new UserInfoVO();
        userInfoVO.userId = userInfo.getUserId();
        userInfoVO.userName = userInfo.getUserName();
        userInfoVO.score = userInfo.getScore();
        userInfoVO.totalCount = userInfo.getTotalCount();
        userInfoVO.winCount = userInfo.getWinCount();
        return userInfoVO;
    }
}
